//
//  EPhoto.h
//  Common
//
//  Created by guoshiqing on 2018/6/1.
//  Copyright © 2018年 www.bitkinetic.com. All rights reserved.
//

#import <UIKit/UIKit.h>

// 图片来源
typedef enum : NSUInteger {
    RESOURCE_LOCAL, // 本地,添加模式
    RESOURCE_NET    // 网络,显示模式
} RESOURCETYPE;

typedef NS_ENUM(NSInteger, PhotoType) {
    PhotoTypePhoto  = 0, // 拍照，Default
    PhotoTypeAdd = 1,    // 相册添加
};


@class EPhoto;

@protocol EPhotoDelegate <NSObject>

@optional
- (void)photoEnlarge:(EPhoto *)photo;
- (void)photoAdd:(EPhoto *)photo;
- (void)photoDel:(EPhoto *)photo;
- (void)photoMoveFinished:(EPhoto *)photo;

@end

@interface EPhoto : UIView

@property (strong, nonatomic) UIButton *delBtn;
@property (strong, nonatomic) UIImageView *viewPhoto;
@property (assign) id <EPhotoDelegate> delegate;


- (id)initWithOrigin:(CGPoint)origin withSize:(CGFloat)size;

- (void)setPhotoType:(PhotoType)type;
- (PhotoType)getPhotoType;
- (void)setPhotoUrl:(id)photoUrl resouceType:(RESOURCETYPE)type;
- (void)moveToPosition:(CGPoint)point;
- (void)setEditModel:(BOOL)edit;

@end
